package situ.autoweter.entity;

import com.alibaba.fastjson.JSONObject;
import java.util.*;
import java.time.*;
/**
 * RD_YearMonth实体类
 * 
 * @author 
 *
 */
public class RdYearmonth {
	/***/
	private Object ID; 
	/***/
	private Integer ReadYear; 
	/***/
	private Integer ReadMonth; 
	/***/
	private Integer IsCurrent; 
	/***/
	private Integer InitEmpID; 
	/***/
	private java.time.Instant InitDate; 
	/***/
	private java.time.Instant EndDate; 
	/**
	 * 实例化
	 */
	public RdYearmonth() {
		super();
	}
	/**
	 * 实例化
	 * 
	 * @param obj
	 */
	public RdYearmonth(JSONObject obj) {
		this();
		this.setID(obj.get("ID"));
		if (obj.get("ReadYear") instanceof Number) {
			this.setReadYear(((Number) obj.get("ReadYear")).intValue());
		}
		if (obj.get("ReadMonth") instanceof Number) {
			this.setReadMonth(((Number) obj.get("ReadMonth")).intValue());
		}
		if (obj.get("IsCurrent") instanceof Number) {
			this.setIsCurrent(((Number) obj.get("IsCurrent")).intValue());
		}
		if (obj.get("InitEmpID") instanceof Number) {
			this.setInitEmpID(((Number) obj.get("InitEmpID")).intValue());
		}
		if (obj.get("InitDate") instanceof java.time.Instant) {
			this.setInitDate((java.time.Instant) obj.get("InitDate"));
		}
		if (obj.get("EndDate") instanceof java.time.Instant) {
			this.setEndDate((java.time.Instant) obj.get("EndDate"));
		}
	}
	
	/**
	 * 将当前对象转换为JsonObject
	 * 
	 * @return
	 */
	public JSONObject toJson() {
		JSONObject result = new JSONObject();
		if (this.getID() != null) {
			result.put("ID",this.getID());
		}
		if (this.getReadYear() != null) {
			result.put("ReadYear",this.getReadYear());
		}
		if (this.getReadMonth() != null) {
			result.put("ReadMonth",this.getReadMonth());
		}
		if (this.getIsCurrent() != null) {
			result.put("IsCurrent",this.getIsCurrent());
		}
		if (this.getInitEmpID() != null) {
			result.put("InitEmpID",this.getInitEmpID());
		}
		if (this.getInitDate() != null) {
			result.put("InitDate",this.getInitDate());
		}
		if (this.getEndDate() != null) {
			result.put("EndDate",this.getEndDate());
		}
		return result;
	}

	public Object getID() {
		return ID;
	}

	public void setID(Object ID) {
		this.ID = ID;
	}

	public Integer getReadYear() {
		return ReadYear;
	}

	public void setReadYear(Integer readYear) {
		ReadYear = readYear;
	}

	public Integer getReadMonth() {
		return ReadMonth;
	}

	public void setReadMonth(Integer readMonth) {
		ReadMonth = readMonth;
	}

	public Integer getIsCurrent() {
		return IsCurrent;
	}

	public void setIsCurrent(Integer isCurrent) {
		IsCurrent = isCurrent;
	}

	public Integer getInitEmpID() {
		return InitEmpID;
	}

	public void setInitEmpID(Integer initEmpID) {
		InitEmpID = initEmpID;
	}

	public Instant getInitDate() {
		return InitDate;
	}

	public void setInitDate(Instant initDate) {
		InitDate = initDate;
	}

	public Instant getEndDate() {
		return EndDate;
	}

	public void setEndDate(Instant endDate) {
		EndDate = endDate;
	}

	@Override
	public String toString() {
		return "RdYearmonth [ID=" + ID + " , ReadYear=" + ReadYear + " , ReadMonth=" + ReadMonth + " , IsCurrent=" + IsCurrent + " , InitEmpID=" + InitEmpID + " , InitDate=" + InitDate + " , EndDate=" + EndDate + "  ]";
	
	}
	
	
}
